{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.6.0+69.ga61365c.dirty\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "import folium\n",
    "\n",
    "print(folium.__version__)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# PolylineTextPath plugin"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgPHNjcmlwdD5MX1BSRUZFUl9DQU5WQVM9ZmFsc2U7IExfTk9fVE9VQ0g9ZmFsc2U7IExfRElTQUJMRV8zRD1mYWxzZTs8L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS4zLjQvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2FqYXguZ29vZ2xlYXBpcy5jb20vYWpheC9saWJzL2pxdWVyeS8xLjExLjEvanF1ZXJ5Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvTGVhZmxldC5h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JywgewogICAgICAgIGNlbnRlcjogWzMwLCAwXSwKICAgICAgICB6b29tOiAzLAogICAgICAgIG1heEJvdW5kczogYm91bmRzLAogICAgICAgIGxheWVyczogW10sCiAgICAgICAgd29ybGRDb3B5SnVtcDogZmFsc2UsCiAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICB6b29tQ29udHJvbDogdHJ1ZSwKICAgICAgICB9KTsKCiAgICAKICAgIAogICAgdmFyIHRpbGVfbGF5ZXJfOTdjMDcxMjUyMjdhNDk1N2I5OTViZDI3MzUwYjI1NjkgPSBMLnRpbGVMYXllcigKICAgICAgICAnaHR0cHM6Ly97c30udGlsZS5vcGVuc3RyZWV0bWFwLm9yZy97en0ve3h9L3t5fS5wbmcnLAogICAgICAgIHsKICAgICAgICAiYXR0cmlidXRpb24iOiBudWxsLAogICAgICAgICJkZXRlY3RSZXRpbmEiOiBmYWxzZSwKICAgICAgICAibWF4TmF0aXZlWm9vbSI6IDE4LAogICAgICAgICJtYXhab29tIjogMTgsCiAgICAgICAgIm1pblpvb20iOiAwLAogICAgICAgICJub1dyYXAiOiBmYWxzZSwKICAgICAgICAib3BhY2l0eSI6IDEsCiAgICAgICAgInN1YmRvbWFpbnMiOiAiYWJjIiwKICAgICAgICAidG1zIjogZmFsc2UKfSkuYWRkVG8obWFwXzRhMzgzNDAyNjgwNTQ0ZDlhOTBlYWM2MjZlZmZmNDE0KTsKICAgIAogICAgICAgICAgICAgICAgdmFyIHBvbHlfbGluZV85NTI5MTY0NDEwMmY0ZGQ5OGQ3ZTJlYzkxYzc3Y2I2YiA9IEwucG9seWxpbmUoCiAgICAgICAgICAgICAgICAgICAgW1s1OS4zNTU2LCAtMzEuOTkyMTldLCBbNTUuMTc4ODcsIC00Mi44OTA2Ml0sIFs0Ny43NTQxLCAtNDMuOTQ1MzFdLCBbMzguMjcyNjksIC0zNy45Njg3NV0sIFsyNy4wNTkxMywgLTQxLjEzMjgxXSwgWzE2LjI5OTA1LCAtMzY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AgICAgICAgICAgICAgICAgICBiZWxvdzogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgb2Zmc2V0OiA3LAogICAgICAgICAgICAgICAgICAgIG9yaWVudGF0aW9uOiAwLAogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZXM6IHsnZmlsbCc6ICcjMDA3REVGJywgJ2ZvbnQtd2VpZ2h0JzogJ2JvbGQnLCAnZm9udC1zaXplJzogJzI0J30KICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAKICAgIAogICAgICAgICAgICAgICAgdmFyIHBvbHlfbGluZV9mN2Y3OWJmYjhhMTY0Y2UxYjZhNTVkZjk0ZDc4YjI1ZSA9IEwucG9seWxpbmUoCiAgICAgICAgICAgICAgICAgICAgW1stNDAuMzExLCAtMzEuOTUyXSwgWy0xMi4wODYsIC0xOC43MjddXSwKICAgICAgICAgICAgICAgICAgICB7CiAgImJ1YmJsaW5nTW91c2VFdmVudHMiOiB0cnVlLAogICJjb2xvciI6ICJvcmFuZ2UiLAogICJkYXNoQXJyYXkiOiBudWxsLAogICJkYXNoT2Zmc2V0IjogbnVsbCwKICAiZmlsbCI6IGZhbHNlLAogICJmaWxsQ29sb3IiOiAib3JhbmdlIiwKICAiZmlsbE9wYWNpdHkiOiAwLjIsCiAgImZpbGxSdWxlIjogImV2ZW5vZGQiLAogICJsaW5lQ2FwIjogInJvdW5kIiwKICAibGluZUpvaW4iOiAicm91bmQiLAogICJub0NsaXAiOiBmYWxzZSwKICAib3BhY2l0eSI6IDAuOCwKICAic21vb3RoRmFjdG9yIjogMS4wLAogICJzdHJva2UiOiB0cnVlLAogICJ3ZWlnaHQiOiAxMAp9CiAgICAgICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgICAgIC5hZGRUbyhtYXBfNGEzODM0MDI2ODA1NDRkOWE5MGVhYzYyNmVmZmY0MTQpOwogICAgICAgICAgICAKICAgIAogICAgICAgICAgICAgICAgcG9seV9saW5lX2Y3Zjc5YmZiOGExNjRjZTFiNmE1NWRmOTRkNzhiMjVlLnNldFRleHQoIuKWuiIsIHsKICAgICAgICAgICAgICAgICAgICByZXBlYXQ6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICBiZWxvdzogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgb2Zmc2V0OiA2LAogICAgICAgICAgICAgICAgICAgIG9yaWVudGF0aW9uOiAwLAogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZXM6IHsnZmlsbCc6ICdyZWQnfQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIAogICAgCiAgICAgICAgICAgICAgICB2YXIgcG9seV9saW5lX2NlMDhlMGY0NGE3MDRmZTY5M2ZjOWNiMmI1ZGRiMWVkID0gTC5wb2x5bGluZSgKICAgICAgICAgICAgICAgICAgICBbWy00OS4zODIzNywgLTM3LjI2NTYyXSwgWy0xLjc1NzU0LCAtMTQuNDE0MDZdLCBbNTEuNjE4MDIsIC0yMy4yMDMxMl1dLAogICAgICAgICAgICAgICAgICAgIHsKICAiYnViYmxpbmdNb3VzZUV2ZW50cyI6IHRydWUsCiAgImNvbG9yIjogImJsYWNrIiwKICAiZGFzaEFycmF5IjogbnVsbCwKICAiZGFzaE9mZnNldCI6IG51bGwsCiAgImZpbGwiOiBmYWxzZSwKICAiZmlsbENvbG9yIjogImJsYWNrIiwKICAiZmlsbE9wYWNpdHkiOiAwLjIsCiAgImZpbGxSdWxlIjogImV2ZW5vZGQiLAogICJsaW5lQ2FwIjogInJvdW5kIiwKICAibGluZUpvaW4iOiAicm91bmQiLAogICJub0NsaXAiOiBmYWxzZSwKICAib3BhY2l0eSI6IDEuMCwKICAic21vb3RoRmFjdG9yIjogMS4wLAogICJzdHJva2UiOiB0cnVlLAogICJ3ZWlnaHQiOiAxCn0KICAgICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAgICAgLmFkZFRvKG1hcF80YTM4MzQwMjY4MD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ICAibGluZUNhcCI6ICJyb3VuZCIsCiAgImxpbmVKb2luIjogInJvdW5kIiwKICAibm9DbGlwIjogZmFsc2UsCiAgIm9wYWNpdHkiOiAxLjAsCiAgInNtb290aEZhY3RvciI6IDEuMCwKICAic3Ryb2tlIjogdHJ1ZSwKICAid2VpZ2h0IjogMwp9CiAgICAgICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgICAgIC5hZGRUbyhtYXBfNGEzODM0MDI2ODA1NDRkOWE5MGVhYzYyNmVmZmY0MTQpOwogICAgICAgICAgICAKICAgIAogICAgICAgICAgICAgICAgdmFyIHBvbHlfbGluZV8zMTZhYWEyNGM1MGE0ZDk0YTgxZWI1MTg3ZGM0YjUxYyA9IEwucG9seWxpbmUoCiAgICAgICAgICAgICAgICAgICAgW1syOC43Njc2NTkxMSwgNzcuNjA3NDIxODhdLCBbMjcuODM5MDc2MDksIDg4LjcyNTU4NTk0XSwgWzI1LjY4MTEzNzM0LCA5Ny4zODI4MTI1XSwgWzIxLjI0ODQyMjI0LCAxMDUuNzc2MzY3MTldXSwKICAgICAgICAgICAgICAgICAgICB7CiAgImJ1YmJsaW5nTW91c2VFdmVudHMiOiB0cnVlLAogICJjb2xvciI6ICIjMzM4OGZmIiwKICAiZGFzaEFycmF5IjogbnVsbCwKICAiZGFzaE9mZnNldCI6IG51bGwsCiAgImZpbGwiOiBmYWxzZSwKICAiZmlsbENvbG9yIjogIiMzMzg4ZmYiLAogICJmaWxsT3BhY2l0eSI6IDAuMiwKICAiZmlsbFJ1bGUiOiAiZXZlbm9kZCIsCiAgImxpbmVDYXAiOiAicm91bmQiLAogICJsaW5lSm9pbiI6ICJyb3VuZCIsCiAgIm5vQ2xpcCI6IGZhbHNlLAogICJvcGFjaXR5IjogMS4wLAogICJzbW9vdGhGYWN0b3IiOiAxLjAsCiAgInN0cm9rZSI6IHRydWUsCiAgIndlaWdodCI6IDMKfQogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgICAgICAuYWRkVG8obWFwXzRhMzgzNDAyNjgwNTQ0ZDlhOTBlYWM2MjZlZmZmNDE0KTsKICAgICAgICAgICAgCiAgICAKICAgICAgICAgICAgICAgIHBvbHlfbGluZV9jZDQ0ZWIyZTMyNjY0MTE3OTIxNjU0OTUyZDJjZjJlZS5zZXRUZXh0KCJUbyBOZXcgRGVsaGkiLCB7CiAgICAgICAgICAgICAgICAgICAgcmVwZWF0OiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICBjZW50ZXI6IGZhbHNlLAogICAgICAgICAgICAgICAgICAgIGJlbG93OiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICBvZmZzZXQ6IC01LAogICAgICAgICAgICAgICAgICAgIG9yaWVudGF0aW9uOiAwLAogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZXM6IE5vbmUKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAKICAgIAogICAgICAgICAgICAgICAgcG9seV9saW5lXzMxNmFhYTI0YzUwYTRkOTRhODFlYjUxODdkYzRiNTFjLnNldFRleHQoIlRvIEhhbm9pIiwgewogICAgICAgICAgICAgICAgICAgIHJlcGVhdDogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICBiZWxvdzogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgb2Zmc2V0OiAtNSwKICAgICAgICAgICAgICAgICAgICBvcmllbnRhdGlvbjogMCwKICAgICAgICAgICAgICAgICAgICBhdHRyaWJ1dGVzOiBOb25lCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgCjwvc2NyaXB0Pg==\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fe4bb631668>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from folium import plugins\n",
    "\n",
    "m = folium.Map([30, 0], zoom_start=3)\n",
    "\n",
    "wind_locations = [\n",
    "    [59.35560, -31.992190],\n",
    "    [55.178870, -42.89062],\n",
    "    [47.754100, -43.94531],\n",
    "    [38.272690, -37.96875],\n",
    "    [27.059130, -41.13281],\n",
    "    [16.299050, -36.56250],\n",
    "    [8.4071700, -30.23437],\n",
    "    [1.0546300, -22.50000],\n",
    "    [-8.754790, -18.28125],\n",
    "    [-21.61658, -20.03906],\n",
    "    [-31.35364, -24.25781],\n",
    "    [-39.90974, -30.93750],\n",
    "    [-43.83453, -41.13281],\n",
    "    [-47.75410, -49.92187],\n",
    "    [-50.95843, -54.14062],\n",
    "    [-55.97380, -56.60156]\n",
    "]\n",
    "\n",
    "wind_line = folium.PolyLine(\n",
    "    wind_locations,\n",
    "    weight=15,\n",
    "    color='#8EE9FF'\n",
    ").add_to(m)\n",
    "\n",
    "attr = {'fill': '#007DEF', 'font-weight': 'bold', 'font-size': '24'}\n",
    "\n",
    "plugins.PolyLineTextPath(\n",
    "    wind_line,\n",
    "    ') ',\n",
    "    repeat=True,\n",
    "    offset=7,\n",
    "    attributes=attr\n",
    ").add_to(m)\n",
    "\n",
    "danger_line = folium.PolyLine(\n",
    "    [[-40.311, -31.952],\n",
    "     [-12.086, -18.727]],\n",
    "    weight=10,\n",
    "    color='orange',\n",
    "    opacity=0.8\n",
    ").add_to(m)\n",
    "\n",
    "attr = {'fill': 'red'}\n",
    "\n",
    "plugins.PolyLineTextPath(\n",
    "    danger_line,\n",
    "    '\\u25BA',\n",
    "    repeat=True,\n",
    "    offset=6,\n",
    "    attributes=attr\n",
    ").add_to(m)\n",
    "\n",
    "plane_line = folium.PolyLine(\n",
    "    [[-49.38237, -37.26562],\n",
    "     [-1.75754, -14.41406],\n",
    "     [51.61802, -23.20312]],\n",
    "    weight=1,\n",
    "    color='black'\n",
    ").add_to(m)\n",
    "\n",
    "attr = {'font-weight': 'bold', 'font-size': '24'}\n",
    "\n",
    "plugins.PolyLineTextPath(\n",
    "    plane_line,\n",
    "    '\\u2708     ',\n",
    "    repeat=True,\n",
    "    offset=8,\n",
    "    attributes=attr\n",
    ").add_to(m)\n",
    "\n",
    "\n",
    "line_to_new_delhi = folium.PolyLine(\n",
    "    [[46.67959447, 3.33984375],\n",
    "     [46.5588603, 29.53125],\n",
    "     [42.29356419, 51.328125],\n",
    "     [35.74651226, 68.5546875],\n",
    "     [28.65203063, 76.81640625]]\n",
    ").add_to(m)\n",
    "\n",
    "\n",
    "line_to_hanoi = folium.PolyLine(\n",
    "    [[28.76765911, 77.60742188],\n",
    "     [27.83907609, 88.72558594],\n",
    "     [25.68113734, 97.3828125],\n",
    "     [21.24842224, 105.77636719]]\n",
    ").add_to(m)\n",
    "\n",
    "\n",
    "plugins.PolyLineTextPath(\n",
    "    line_to_new_delhi,\n",
    "    'To New Delhi',\n",
    "    offset=-5\n",
    ").add_to(m)\n",
    "\n",
    "\n",
    "plugins.PolyLineTextPath(\n",
    "    line_to_hanoi,\n",
    "    'To Hanoi',\n",
    "    offset=-5\n",
    ").add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'PolyLineTextPath.html'))\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgPHNjcmlwdD5MX1BSRUZFUl9DQU5WQVM9ZmFsc2U7IExfTk9fVE9VQ0g9ZmFsc2U7IExfRElTQUJMRV8zRD1mYWxzZTs8L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZ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ZsZXQtYW50LXBhdGgubWluLmpzIj48L3NjcmlwdD4KPC9oZWFkPgo8Ym9keT4gICAgCiAgICAKICAgIDxkaXYgY2xhc3M9ImZvbGl1bS1tYXAiIGlkPSJtYXBfMTU4MDkyZWM1ZTQwNDYwYWI4OWRlYjQ2YmU2NDhiZWQiID48L2Rpdj4KPC9ib2R5Pgo8c2NyaXB0PiAgICAKICAgIAogICAgCiAgICAgICAgdmFyIGJvdW5kcyA9IG51bGw7CiAgICAKCiAgICB2YXIgbWFwXzE1ODA5MmVjNWU0MDQ2MGFiODlkZWI0NmJlNjQ4YmVkID0gTC5tYXAoCiAgICAgICAgJ21hcF8xNTgwOTJlYzVlNDA0NjBhYjg5ZGViNDZiZTY0OGJlZCcsIHsKICAgICAgICBjZW50ZXI6IFswLCAwXSwKICAgICAgICB6b29tOiAxLAogICAgICAgIG1heEJvdW5kczogYm91bmRzLAogICAgICAgIGxheWVyczogW10sCiAgICAgICAgd29ybGRDb3B5SnVtcDogZmFsc2UsCiAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICB6b29tQ29udHJvbDogdHJ1ZSwKICAgICAgICB9KTsKCiAgICAKICAgIAogICAgdmFyIHRpbGVfbGF5ZXJfNGM4ZDkwMWExMDNjNGFhMDk5MjY0OTQwOTMxNDlhZmYgPSBMLnRpbGVMYXllcigKICAgICAgICAnaHR0cHM6Ly97c30udGlsZS5vcGVuc3RyZWV0bWFwLm9yZy97en0ve3h9L3t5fS5wbmcnLAogICAgICAgIHsKICAgICAgICAiYXR0cmlidXRpb24iOiBudWxsLAogICAgICAgICJkZXRlY3RSZXRpbmEiOiBmYWxzZSwKICAgICAgICAibWF4TmF0aXZlWm9vbSI6IDE4LAogICAgICAgICJtYXhab29tIjogMTgsCiAgICAgICAgIm1pblpvb20iOiAwLAogICAgICAgICJub1dyYXAiOiBmYWxzZSwKICAgICAgICAib3BhY2l0eSI6IDEsCiAgICAgICAgInN1YmRvbWFpbnMiOiAiYWJjIi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GluZUNhcCI6ICJyb3VuZCIsCiAgImxpbmVKb2luIjogInJvdW5kIiwKICAibm9DbGlwIjogZmFsc2UsCiAgIm9wYWNpdHkiOiAwLjUsCiAgInBhdXNlZCI6IGZhbHNlLAogICJwdWxzZUNvbG9yIjogIiNGRkZGRkYiLAogICJyZXZlcnNlIjogIlRydWUiLAogICJzbW9vdGhGYWN0b3IiOiAxLjAsCiAgInN0cm9rZSI6IHRydWUsCiAgIndlaWdodCI6IDUKfQogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgICAgICAuYWRkVG8obWFwXzE1ODA5MmVjNWU0MDQ2MGFiODlkZWI0NmJlNjQ4YmVkKTsKICAgICAgICAgICAgCiAgICAKICAgICAgICAgICAgICAgIAoKICAgICAgICAgICAgICAgIG1hcF8xNTgwOTJlYzVlNDA0NjBhYjg5ZGViNDZiZTY0OGJlZC5maXRCb3VuZHMoCiAgICAgICAgICAgICAgICAgICAgW1stNTUuOTczOCwgLTU2LjYwMTU2XSwgWzU5LjM1NTYsIC0xOC4yODEyNV1dLAogICAgICAgICAgICAgICAgICAgIHt9CiAgICAgICAgICAgICAgICAgICAgKTsKICAgICAgICAgICAgCjwvc2NyaXB0Pg==\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fe4bb6247b8>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map()\n",
    "\n",
    "folium.plugins.AntPath(\n",
    "    locations=wind_locations,\n",
    "    reverse='True',\n",
    "    dash_array=[20, 30]\n",
    ").add_to(m)\n",
    "\n",
    "m.fit_bounds(m.get_bounds())\n",
    "\n",
    "m.save(os.path.join('results', 'AntPath.html'))\n",
    "\n",
    "m"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
